<?php


namespace app\api\validate;


use think\Validate;

class UserBankAdd extends Validate
{
    protected $rule = [
        'bankType' => 'require|number|in:1,2', //1银行卡  2支付宝
//        'bankName' => 'require',
//        'province' => 'require',
//        'city' => 'require',
        'bankCard' => 'require|max:50',
//        'openBank' => 'require',
        'accountHolder' => 'require|max:50',
        'code' => 'number|length:4'
    ];
    protected $message  =   [
        'bankType.require' => '请选择需要绑定的卡类型',
        'bankType.number' => '卡类型错误',
        'bankType.in' => '卡类型错误',
//        'bankName.require' => '银行名称必须选择',
//        'province.require' => '省必须选择',
//        'city.require' => '市必须选择',
        'bankCard.require' => '支付宝账号/银行卡号 必须输入',
//        'bankCard.number' => '银行卡号只能是数字',
        'bankCard.max' => '支付宝账号/银行卡号码 长度不能超过50位',
//        'openBank.require' => '开户行必须输入',
        'accountHolder.require' => '姓名必须输入',
        'accountHolder.max' => '姓名长度过长',
//        'code.require' => '验证码必须输入',
        'code.number' => '验证码必须是数字',
        'code.length' => '验证码长度只能是4位',
    ];
}